package com.irs.irsforum.entity;

import java.io.Serializable;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author yihuili
 * @since 2020-02-12
 */
@Data
public class Record extends Model<Record> {

    private static final long serialVersionUID = 1L;

    /**
     * 记录id
     */
	@TableId(value="id", type= IdType.AUTO)
	private Long id;
    /**
     * 学生id
     */
	@TableField("stu_id")
	private Long stuId;
    /**
     * 问题id
     */
	@TableField("problem_id")
	private Long problemId;
    /**
     * 课程id
     */
	@TableField("subject_id")
	private Long subjectId;
    /**
     * 知识节点id
     */
	@TableField("node_id")
	private Long nodeId;
    /**
     * 问题在领域知识结构图中的位置
     */
	@TableField("problem_hierarchy")
	private String problemHierarchy;
    /**
     * 问题出现的次数
     */
	@TableField("problem_view")
	private Integer problemView;
    /**
     * 答题开始时间
     */
	@TableField("start_time")
	private Date startTime;
    /**
     * 答题结束时间
     */
	@TableField("end_time")
	private Date endTime;
    /**
     * 步长
     */
	private Integer duration;
    /**
     * 首次提交时间
     */
	@TableField("first_transaction_time")
	private Date firstTransactionTime;
    /**
     * 首次提交结果
     */
	@TableField("first_attempt")
	private String firstAttempt;
    /**
     * 首次步长
     */
	@TableField("first_duration")
	private Integer firstDuration;
    /**
     * 正确提交时间
     */
	@TableField("correct_transaction_time")
	private Date correctTransactionTime;
    /**
     * 正确步长
     */
	@TableField("correct_duration")
	private Integer correctDuration;
    /**
     * 正确提交的次数
     */
	private Integer corrects;
    /**
     * 错误答案的提交次数
     */
	private Integer inCorrects;
    /**
     * 提示的次数
     */
	private Integer hints;

	private List<Long> studentList;

	public Record(Long subjectId, List<Long> studentList) {
		this.subjectId = subjectId;
		this.studentList = studentList;
	}

	public Record() {
	}


	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "Record{" +
			"id=" + id +
			", stuId=" + stuId +
			", problemId=" + problemId +
			", subjectId=" + subjectId +
			", nodeId=" + nodeId +
			", problemHierarchy=" + problemHierarchy +
			", problemView=" + problemView +
			", startTime=" + startTime +
			", endTime=" + endTime +
			", duration=" + duration +
			", firstTransactionTime=" + firstTransactionTime +
			", firstAttempt=" + firstAttempt +
			", firstDuration=" + firstDuration +
			", correctTransactionTime=" + correctTransactionTime +
			", correctDuration=" + correctDuration +
			", corrects=" + corrects +
			", inCorrects=" + inCorrects +
			", hints=" + hints +
			"}";
	}
}
